<template>
  <div class="demo-title">slider/demo4</div>
  <div class="demo">
    <Slider v-model="val" :marks="marks" :step="5" :max="20" @change="change" />
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import Slider from '@sscd-mobile/slider'
  const val = ref(5)
  const marks = ref({
    0: 0,
    5: 5,
    10: 10,
    15: 15,
    20: 20,
  })
  const change = (value: number) => {
    console.log(value)
  }
</script>

<style lang="less" scoped>
  .demo {
    padding: 40px 18px;
    background: #fff;
  }
</style>
